﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace TimeTracker.XmlProvider
{
    public partial class Provider : IProvider
    {

        IEnumerable<IProject> IProvider.GetProjects()
        {
            return this.GetProjects().Cast<IProject>();
        }

        IProject IProvider.CreateProject(IProject parentProject, string name)
        {
            return (IProject)this.CreateProject((XProjectElement)parentProject, name);
        }

        ISession IProvider.CreateSession(IProject project, DateTime start, DateTime? end)
        {
            return (ISession)this.CreateSession((XProjectElement)project, start, end);
        }

        INote IProvider.CreateNote(ISession session, DateTime time, string text)
        {
            return (INote)this.CreateNote((XSessionElement)session, time, text);
        }

        void IProvider.RemoveProject(IProject project)
        {
            this.RemoveProject(project);
        }

        void IProvider.RemoveSession(ISession session)
        {
            this.RemoveSession(session);
        }

        void IProvider.RemoveNote(INote note)
        {
            this.RemoveNote(note);
        }

        System.Xml.XmlDocument IProvider.GetXmlDocument()
        {
            return this.GetXmlDocument();
        }


        void IProvider.Save()
        {
            this.Save();
        }
    }
}
